package com.codebattery.service;


import com.codebattery.domain.entity.GoodsPic;
import com.codebattery.mapper.BaseMapper;
import com.codebattery.repository.GoodsPicMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class GoodsPicService extends MyBatisBaseServiceImpl<GoodsPic, Integer>{
    private static final Logger logger = LoggerFactory.getLogger(GoodsPicService.class);

    @Resource
    private GoodsPicMapper goodsPicMapper;

    @Override
    protected BaseMapper<GoodsPic, Integer> mapper() {
        return goodsPicMapper;
    }

    /**
     * 获取商品图片
     *
     * @param goodId
     * @return
     */
    public List<GoodsPic> getGoodsPic(Integer goodId) {
        return goodsPicMapper.selectByGoodsId(goodId);
    }

}
